<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.12"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>emp-toolkit: /Users/wangxiao/git/emp-toolkit/emp-tool/io/hash_io_channel.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="logo-full-doxygen.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">emp-toolkit
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.12 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('hash__io__channel_8h_source.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">hash_io_channel.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="hash__io__channel_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#ifndef HASH_IO_CHANNEL_H__</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="preprocessor">#define HASH_IO_CHANNEL_H__</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="hash_8h.html">hash.h</a>&quot;</span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="net__io__channel_8h.html">net_io_channel.h</a>&quot;</span></div><div class="line"><a name="l00009"></a><span class="lineno"><a class="line" href="class_hash_i_o.html">    9</a></span>&#160;<span class="keyword">class </span><a class="code" href="class_hash_i_o.html">HashIO</a>: <span class="keyword">public</span> <a class="code" href="class_i_o_channel.html">IOChannel</a>&lt;HashIO&gt;{ <span class="keyword">public</span>:</div><div class="line"><a name="l00010"></a><span class="lineno"><a class="line" href="class_hash_i_o.html#ad65b81a95fc2d04ec2f86d39b5234b19">   10</a></span>&#160;    <a class="code" href="class_hash.html">Hash</a> <a class="code" href="class_hash_i_o.html#ad65b81a95fc2d04ec2f86d39b5234b19">h</a>;</div><div class="line"><a name="l00011"></a><span class="lineno"><a class="line" href="class_hash_i_o.html#a37be00aa0ddbe86e1ab420e027bd8a8d">   11</a></span>&#160;    <a class="code" href="class_net_i_o.html">NetIO</a> * <a class="code" href="class_hash_i_o.html#a37be00aa0ddbe86e1ab420e027bd8a8d">netio</a>;</div><div class="line"><a name="l00012"></a><span class="lineno"><a class="line" href="class_hash_i_o.html#a13b7412ce0826465d7406a6e668b0015">   12</a></span>&#160;    <a class="code" href="class_hash_i_o.html#a13b7412ce0826465d7406a6e668b0015">HashIO</a>(<a class="code" href="class_net_i_o.html">NetIO</a> * _netio ) {</div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;        this-&gt;netio = _netio;</div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;    }</div><div class="line"><a name="l00015"></a><span class="lineno"><a class="line" href="class_hash_i_o.html#a3f662ad494f26c0509d6ffce0c725af4">   15</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_hash_i_o.html#a3f662ad494f26c0509d6ffce0c725af4">send_data_impl</a>(<span class="keyword">const</span> <span class="keywordtype">void</span> * data, <span class="keywordtype">int</span> len) {</div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;        h.<a class="code" href="class_hash.html#a4bb9da7bf411c5db9af391fc3ec74f81">put</a>(data, len);</div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;    }</div><div class="line"><a name="l00018"></a><span class="lineno"><a class="line" href="class_hash_i_o.html#af9cf032865427c22d2343d8b35c01b10">   18</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_hash_i_o.html#af9cf032865427c22d2343d8b35c01b10">recv_data_impl</a>(<span class="keywordtype">void</span>  * data, <span class="keywordtype">int</span> len) {</div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;        netio-&gt;<a class="code" href="class_i_o_channel.html#aecdc2e6d7e95d96d346c63fc57e5b4eb">recv_data</a>(data, len);</div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;        h.<a class="code" href="class_hash.html#a4bb9da7bf411c5db9af391fc3ec74f81">put</a>(data, len);</div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;    }</div><div class="line"><a name="l00022"></a><span class="lineno"><a class="line" href="class_hash_i_o.html#acd32ce110cdfb7121f4d565654a42576">   22</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_hash_i_o.html#acd32ce110cdfb7121f4d565654a42576">get_digest</a>(<span class="keywordtype">char</span> * dgst){</div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;        h.<a class="code" href="class_hash.html#a574b6b0ef1b80eb4b15809cc15257a3f">digest</a>(dgst);</div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;    }</div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;};</div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="preprocessor">#endif//HASH_IO_CHANNEL_H__</span></div><div class="ttc" id="class_i_o_channel_html_aecdc2e6d7e95d96d346c63fc57e5b4eb"><div class="ttname"><a href="class_i_o_channel.html#aecdc2e6d7e95d96d346c63fc57e5b4eb">IOChannel::recv_data</a></div><div class="ttdeci">void recv_data(void *data, int nbyte)</div><div class="ttdef"><b>Definition:</b> io_channel.h:17</div></div>
<div class="ttc" id="class_hash_i_o_html"><div class="ttname"><a href="class_hash_i_o.html">HashIO</a></div><div class="ttdef"><b>Definition:</b> hash_io_channel.h:9</div></div>
<div class="ttc" id="class_hash_i_o_html_af9cf032865427c22d2343d8b35c01b10"><div class="ttname"><a href="class_hash_i_o.html#af9cf032865427c22d2343d8b35c01b10">HashIO::recv_data_impl</a></div><div class="ttdeci">void recv_data_impl(void *data, int len)</div><div class="ttdef"><b>Definition:</b> hash_io_channel.h:18</div></div>
<div class="ttc" id="class_hash_i_o_html_a3f662ad494f26c0509d6ffce0c725af4"><div class="ttname"><a href="class_hash_i_o.html#a3f662ad494f26c0509d6ffce0c725af4">HashIO::send_data_impl</a></div><div class="ttdeci">void send_data_impl(const void *data, int len)</div><div class="ttdef"><b>Definition:</b> hash_io_channel.h:15</div></div>
<div class="ttc" id="hash_8h_html"><div class="ttname"><a href="hash_8h.html">hash.h</a></div></div>
<div class="ttc" id="class_net_i_o_html"><div class="ttname"><a href="class_net_i_o.html">NetIO</a></div><div class="ttdef"><b>Definition:</b> net_io_channel.h:22</div></div>
<div class="ttc" id="class_hash_i_o_html_a13b7412ce0826465d7406a6e668b0015"><div class="ttname"><a href="class_hash_i_o.html#a13b7412ce0826465d7406a6e668b0015">HashIO::HashIO</a></div><div class="ttdeci">HashIO(NetIO *_netio)</div><div class="ttdef"><b>Definition:</b> hash_io_channel.h:12</div></div>
<div class="ttc" id="class_hash_html_a4bb9da7bf411c5db9af391fc3ec74f81"><div class="ttname"><a href="class_hash.html#a4bb9da7bf411c5db9af391fc3ec74f81">Hash::put</a></div><div class="ttdeci">void put(const void *data, int nbyte)</div><div class="ttdef"><b>Definition:</b> hash.h:23</div></div>
<div class="ttc" id="class_hash_i_o_html_a37be00aa0ddbe86e1ab420e027bd8a8d"><div class="ttname"><a href="class_hash_i_o.html#a37be00aa0ddbe86e1ab420e027bd8a8d">HashIO::netio</a></div><div class="ttdeci">NetIO * netio</div><div class="ttdef"><b>Definition:</b> hash_io_channel.h:11</div></div>
<div class="ttc" id="net__io__channel_8h_html"><div class="ttname"><a href="net__io__channel_8h.html">net_io_channel.h</a></div></div>
<div class="ttc" id="class_hash_i_o_html_acd32ce110cdfb7121f4d565654a42576"><div class="ttname"><a href="class_hash_i_o.html#acd32ce110cdfb7121f4d565654a42576">HashIO::get_digest</a></div><div class="ttdeci">void get_digest(char *dgst)</div><div class="ttdef"><b>Definition:</b> hash_io_channel.h:22</div></div>
<div class="ttc" id="class_hash_html"><div class="ttname"><a href="class_hash.html">Hash</a></div><div class="ttdef"><b>Definition:</b> hash.h:12</div></div>
<div class="ttc" id="class_hash_i_o_html_ad65b81a95fc2d04ec2f86d39b5234b19"><div class="ttname"><a href="class_hash_i_o.html#ad65b81a95fc2d04ec2f86d39b5234b19">HashIO::h</a></div><div class="ttdeci">Hash h</div><div class="ttdef"><b>Definition:</b> hash_io_channel.h:10</div></div>
<div class="ttc" id="class_i_o_channel_html"><div class="ttname"><a href="class_i_o_channel.html">IOChannel</a></div><div class="ttdef"><b>Definition:</b> io_channel.h:12</div></div>
<div class="ttc" id="class_hash_html_a574b6b0ef1b80eb4b15809cc15257a3f"><div class="ttname"><a href="class_hash.html#a574b6b0ef1b80eb4b15809cc15257a3f">Hash::digest</a></div><div class="ttdeci">void digest(char *a)</div><div class="ttdef"><b>Definition:</b> hash.h:38</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_eec959d81771dc8b1a750b834e1341eb.html">emp-tool</a></li><li class="navelem"><a class="el" href="dir_6f7196b439314a1a73bb5510dd78598a.html">io</a></li><li class="navelem"><a class="el" href="hash__io__channel_8h.html">hash_io_channel.h</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.12 </li>
  </ul>
</div>
</body>
</html>
